********************************************************************************
********************************************************************************
**					       Replication file for:							  **
**							  												  **
**	      The Institutional Sources of Economic Transformation: 		      ** 
**	  Insulation and Compensation in the Politics of Energy Transitions		  **
**																			  **
**	   Jared J. Finnegan, Phillip Lipscy, Jonas Meckling, Florence Metz		  **
********************************************************************************
********************************************************************************


//Load dataset "Finnegan et al_The Institutional Sources of Economic Transformation_1960_1985.dta"


//Set data
xtset countryid year


//Figure A1. Country-specific oil costs in 1980
graph hbar oil_import_cost if tin(1980,1980) & countryid!=6 & countryid!=7 & countryid!=9 & countryid!=16 & countryid!=17, over(countryid, sort(1) desc) ytitle("Oil import costs in 1980 (nominal USD/barrel)")


//Figure A2. Country-specific oil costs in 1985
graph hbar oil_import_cost if tin(1985,1985) & countryid!=6 & countryid!=7 & countryid!=9 & countryid!=16 & countryid!=17, over(countryid, sort(1) desc) ytitle("Oil import costs in 1985 (nominal USD/barrel)")


//Table A5. Placebo outcome test with switched DVs
xtreg Electricityproductionfromoil i.d_side_dummy##i.shock73 i.year, fe r

xtreg Electricityproductionfromoil i.d_side_dummy##i.shock73 prod_oil_pc realgdpgr inflation unemp GDPPPPbillion2010USdollars_pc i.year, fe r

xtreg Electricityproductionfromoil i.d_side_dummy##i.shock73 i.singleparty polconiii prod_oil_pc realgdpgr inflation unemp GDPPPPbillion2010USdollars_pc gov_left1 openc i.year, fe r

xtreg gas_tax_nomusd_marketxr i.s_side_dummy##i.shock73  i.year if tin(1965,1985), fe r

xtreg gas_tax_nomusd_marketxr i.s_side_dummy##i.shock73 prod_oil_pc realgdpgr inflation unemp GDPPPPbillion2010USdollars_pc vehicle_pc urban_pop i.year if tin(1965,1985), fe r

xtreg gas_tax_nomusd_marketxr i.s_side_dummy##i.shock73 i.singleparty polconiii prod_oil_pc realgdpgr inflation unemp GDPPPPbillion2010USdollars_pc gov_left1 openc vehicle_pc urban_pop i.year if tin(1965,1985), fe r


//Table A6. OLS Regressions with Two-Way Fixed Effects
xtreg Electricityproductionfromoil i.s_side_dummy##i.shock73 i.year, fe r

xtreg Electricityproductionfromoil i.s_side_dummy##i.shock73 prod_oil_pc realgdpgr inflation unemp GDPPPPbillion2010USdollars_pc i.year, fe r

xtreg Electricityproductionfromoil i.s_side_dummy##i.shock73 i.singleparty polconiii prod_oil_pc realgdpgr inflation unemp GDPPPPbillion2010USdollars_pc gov_left1 openc i.year, fe r

xtreg gas_tax_nomusd_marketxr i.d_side_dummy##i.shock73  i.year if tin(1965,1985), fe r

xtreg gas_tax_nomusd_marketxr i.d_side_dummy##i.shock73 prod_oil_pc realgdpgr inflation unemp GDPPPPbillion2010USdollars_pc vehicle_pc urban_pop i.year if tin(1965,1985), fe r

xtreg gas_tax_nomusd_marketxr i.d_side_dummy##i.shock73 i.singleparty polconiii prod_oil_pc realgdpgr inflation unemp GDPPPPbillion2010USdollars_pc gov_left1 openc vehicle_pc urban_pop i.year if tin(1965,1985), fe r


//Table A7. OLS Regressions with Two-Way Fixed Effects: Lagged Dependent Variable
xtreg Electricityproductionfromoil l.Electricityproductionfromoil i.s_side_dummy##i.shock73 i.year, fe r

xtreg Electricityproductionfromoil l.Electricityproductionfromoil i.s_side_dummy##i.shock73 prod_oil_pc realgdpgr inflation unemp GDPPPPbillion2010USdollars_pc i.year, fe r

xtreg Electricityproductionfromoil l.Electricityproductionfromoil i.s_side_dummy##i.shock73 i.singleparty polconiii prod_oil_pc realgdpgr inflation unemp GDPPPPbillion2010USdollars_pc gov_left1 openc i.year, fe r

reg Electricityproductionfromoil l.Electricityproductionfromoil i.s_side_dummy##i.shock73 i.singleparty polconiii prod_oil_pc realgdpgr inflation unemp GDPPPPbillion2010USdollars_pc gov_left1 openc i.year, cl(countryid)

xtreg gas_tax_nomusd_marketxr l.gas_tax_nomusd_marketxr i.d_side_dummy##i.shock73  i.year if tin(1965,1985), fe r

xtreg gas_tax_nomusd_marketxr l.gas_tax_nomusd_marketxr i.d_side_dummy##i.shock73 prod_oil_pc realgdpgr inflation unemp GDPPPPbillion2010USdollars_pc vehicle_pc urban_pop i.year if tin(1965,1985), fe r

xtreg gas_tax_nomusd_marketxr l.gas_tax_nomusd_marketxr i.d_side_dummy##i.shock73 i.singleparty polconiii prod_oil_pc realgdpgr inflation unemp GDPPPPbillion2010USdollars_pc gov_left1 openc vehicle_pc urban_pop i.year if tin(1965,1985), fe r

reg gas_tax_nomusd_marketxr l.gas_tax_nomusd_marketxr i.d_side_dummy##i.shock73 i.singleparty polconiii prod_oil_pc realgdpgr inflation unemp GDPPPPbillion2010USdollars_pc gov_left1 openc vehicle_pc urban_pop i.year if tin(1965,1985), cl(countryid)


//Figure A12. Dependence on imported oil in 1972
graph hbar oilshock_73_hetero_tpes if tin(1973,1973) & countryid!=9 & countryid!=16 & countryid!=17, over(countryid, sort(1) desc) ytitle("Net oil imports as percentage of TPES (1972)")


//Table A8. OLS Regressions with Two-Way Fixed Effects: Heterogeneous treatment effects
xtreg Electricityproductionfromoil i.s_side_dummy##c.oilshock_73_hetero_tpes i.year, fe r

xtreg Electricityproductionfromoil i.s_side_dummy##c.oilshock_73_hetero_tpes prod_oil_pc realgdpgr inflation unemp GDPPPPbillion2010USdollars_pc i.year, fe r

xtreg Electricityproductionfromoil i.s_side_dummy##c.oilshock_73_hetero_tpes i.singleparty polconiii prod_oil_pc realgdpgr inflation unemp GDPPPPbillion2010USdollars_pc gov_left1 openc i.year, fe r

xtreg gas_tax_nomusd_marketxr i.d_side_dummy##c.oilshock_73_hetero_tpes  i.year if tin(1965,1985), fe r

xtreg gas_tax_nomusd_marketxr i.d_side_dummy##c.oilshock_73_hetero_tpes prod_oil_pc realgdpgr inflation unemp GDPPPPbillion2010USdollars_pc vehicle_pc urban_pop i.year if tin(1965,1985), fe r

xtreg gas_tax_nomusd_marketxr i.d_side_dummy##c.oilshock_73_hetero_tpes i.singleparty polconiii prod_oil_pc realgdpgr inflation unemp GDPPPPbillion2010USdollars_pc gov_left1 openc vehicle_pc urban_pop i.year if tin(1965,1985), fe r

